/*
date:20210304 pm14:53
key:1.每个数字只有两种组成可能。用递归方便但是输出的时候就慢了，可以先放入数组，就不用每个数都递归了。
*/
#include<math.h>
#include <stdio.h>
#include <bitset>  
#include<iostream>
#include<sstream>
#include<stdlib.h>
using namespace std;
const float PI = 3.14159265358979323;
long hex_int(string s, int base)
{
	//string转成字符数组
	char* s1 = new char[s.size()];
	for (int i = 0; i < s.size(); i++)
	{
		s1[i] = s[i];

	}
	char* s2;
	//以base为底的数字以字符数组输入，得到10进制对应数字
	return strtol(s1, &s2, base);
}
int jiecheng(int n)
{
	int j = 1;
	for (int i = 1; i <= n; i++)
	{
		j = j * i;
	}
	return j;
}
int yanghui(int m, int n)
{	
	//每行第一个和最后一个是1
	if (m == n||n==1 )
	{
		return 1;
	}
	//其次由两肩组成
	else
	{
		return yanghui(m-1, n - 1) + yanghui(m - 1, n);
	}
}

int main()
{
	
	int n;
	cin >> n;

	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= i; j++)
		{
			
			cout<< yanghui(i, j)<<" ";
		}
		cout << "\n";
	}
	

	
}
